package org.dragonnova.meetingclient.utils;

import android.content.Context;
import android.content.SharedPreferences;

import org.dragonnova.meetingclient.client.application.MeetingApplication;

/**
 * Created by hucn on 2016/6/20.
 * Description:
 */
public class ConfigUtil {

    // 用户信息
    private static String USER_INFO = Constants.APP_GLOBAL_CONFIG;

    // 第一次启动
    private static String CLIENT_NAME = "CLIENT_NAME";

    public static SharedPreferences UserInfoPreferences = MeetingApplication.getContext().getSharedPreferences(USER_INFO, Context.MODE_PRIVATE);

    public static String getSavedClientName() {
        return UserInfoPreferences.getString(CLIENT_NAME, "default");
    }

    public static void saveClientName(String clientName) {
        UserInfoPreferences.edit().putString(CLIENT_NAME, clientName).apply();
    }
}
